import httpInstance from "@/utils/http";
import Cookies from 'js-cookie';

export function getCategoryAPI(){
    return httpInstance({
        url: 'user/category',
        method: 'get'
    })
}

export function getCategoryChildAPI(){
    return httpInstance({
        url: 'user/categoryChild',
        method: 'get'
    })
}

export function getUserInfo(){
    if(Cookies.get("token") != null){
        return httpInstance({
            url: 'user/info',
            method: 'post',
            headers:{
                "token":Cookies.get("token")
            }
        })
    }
}